package com.pengtu.dao.app;

import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Restrictions;
import org.springframework.stereotype.Repository;
import com.pengtu.dao.hibernate.HibernateDao;
import com.pengtu.entity.app.Code;
import com.pengtu.entity.app.SerialNumber;
import com.pengtu.entity.app.TrialNumber;

@Repository
public class TrialNumberDao extends HibernateDao<TrialNumber, String>{
	/**
	 * 
	 * getTrialNumberByTrialType:
	 * 适用: 根据trialType 查询对应的TrialNumber
	 * @param trialType
	 * @return 
	 * @exception 
	 * @since  1.0.0
	 */
	public TrialNumber getTrialTypeNumberByTrialType(String trialType){
		Criterion typec = Restrictions.eq("trialType", trialType);
		 return findUnique(typec);
	}
}
